Integrand size = 21, antiderivative size = 122 \[ \int \frac {x (a+b \arctan (c x))}{(d+i c d x)^2} \, dx=-\frac {b}{2 c^2 d^2 (i-c x)}+\frac {b \arctan (c x)}{2 c^2 d^2}-\frac {i (a+b \arctan (c x))}{c^2 d^2 (i-c x)}+\frac {(a+b \arctan (c x)) \log \left (\frac {2}{1+i c x}\right )}{c^2 d^2}+\frac {i b \operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{2 c^2 d^2} \]
[Out]
Time = 0.11 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.381, Rules used = {4996, 4972, 641, 46, 209, 4964, 2449, 2352} \[ \int \frac {x (a+b \arctan (c x))}{(d+i c d x)^2} \, dx=-\frac {i (a+b \arctan (c x))}{c^2 d^2 (-c x+i)}+\frac {\log \left (\frac {2}{1+i c x}\right ) (a+b \arctan (c x))}{c^2 d^2}+\frac {b \arctan (c x)}{2 c^2 d^2}+\frac {i b \operatorname {PolyLog}\left (2,1-\frac {2}{i c x+1}\right )}{2 c^2 d^2}-\frac {b}{2 c^2 d^2 (-c x+i)} \]
[In]
[Out]
Rule 46
Rule 209
Rule 641
Rule 2352
Rule 2449
Rule 4964
Rule 4972
Rule 4996
Rubi steps \begin{align*} \text {integral}& = \int \left (-\frac {i (a+b \arctan (c x))}{c d^2 (-i+c x)^2}-\frac {a+b \arctan (c x)}{c d^2 (-i+c x)}\right ) \, dx \\ & = -\frac {i \int \frac {a+b \arctan (c x)}{(-i+c x)^2} \, dx}{c d^2}-\frac {\int \frac {a+b \arctan (c x)}{-i+c x} \, dx}{c d^2} \\ & = -\frac {i (a+b \arctan (c x))}{c^2 d^2 (i-c x)}+\frac {(a+b \arctan (c x)) \log \left (\frac {2}{1+i c x}\right )}{c^2 d^2}-\frac {(i b) \int \frac {1}{(-i+c x) \left (1+c^2 x^2\right )} \, dx}{c d^2}-\frac {b \int \frac {\log \left (\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{c d^2} \\ & = -\frac {i (a+b \arctan (c x))}{c^2 d^2 (i-c x)}+\frac {(a+b \arctan (c x)) \log \left (\frac {2}{1+i c x}\right )}{c^2 d^2}+\frac {(i b) \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1+i c x}\right )}{c^2 d^2}-\frac {(i b) \int \frac {1}{(-i+c x)^2 (i+c x)} \, dx}{c d^2} \\ & = -\frac {i (a+b \arctan (c x))}{c^2 d^2 (i-c x)}+\frac {(a+b \arctan (c x)) \log \left (\frac {2}{1+i c x}\right )}{c^2 d^2}+\frac {i b \operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{2 c^2 d^2}-\frac {(i b) \int \left (-\frac {i}{2 (-i+c x)^2}+\frac {i}{2 \left (1+c^2 x^2\right )}\right ) \, dx}{c d^2} \\ & = -\frac {b}{2 c^2 d^2 (i-c x)}-\frac {i (a+b \arctan (c x))}{c^2 d^2 (i-c x)}+\frac {(a+b \arctan (c x)) \log \left (\frac {2}{1+i c x}\right )}{c^2 d^2}+\frac {i b \operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{2 c^2 d^2}+\frac {b \int \frac {1}{1+c^2 x^2} \, dx}{2 c d^2} \\ & = -\frac {b}{2 c^2 d^2 (i-c x)}+\frac {b \arctan (c x)}{2 c^2 d^2}-\frac {i (a+b \arctan (c x))}{c^2 d^2 (i-c x)}+\frac {(a+b \arctan (c x)) \log \left (\frac {2}{1+i c x}\right )}{c^2 d^2}+\frac {i b \operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{2 c^2 d^2} \\ \end{align*}
Time = 0.06 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.05 \[ \int \frac {x (a+b \arctan (c x))}{(d+i c d x)^2} \, dx=-\frac {i (a+b \arctan (c x))}{c^2 d^2 (i-c x)}-\frac {b \left (\frac {1}{c (i-c x)}-\frac {\arctan (c x)}{c}\right )}{2 c d^2}+\frac {(a+b \arctan (c x)) \log \left (\frac {2 i}{i-c x}\right )}{c^2 d^2}+\frac {i b \operatorname {PolyLog}\left (2,-\frac {i+c x}{i-c x}\right )}{2 c^2 d^2} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 251 vs. \(2 (110 ) = 220\).
Time = 0.92 (sec) , antiderivative size = 252, normalized size of antiderivative = 2.07
method | result | size |
derivativedivides | \(\frac {\frac {i a}{d^{2} \left (c x -i\right )}-\frac {a \ln \left (c^{2} x^{2}+1\right )}{2 d^{2}}-\frac {i a \arctan \left (c x \right )}{d^{2}}+\frac {i b \arctan \left (c x \right )}{d^{2} \left (c x -i\right )}-\frac {b \arctan \left (c x \right ) \ln \left (c x -i\right )}{d^{2}}+\frac {i b \ln \left (c^{4} x^{4}+10 c^{2} x^{2}+9\right )}{16 d^{2}}-\frac {b \arctan \left (\frac {c x}{2}\right )}{8 d^{2}}+\frac {b \arctan \left (\frac {1}{6} c^{3} x^{3}+\frac {7}{6} c x \right )}{8 d^{2}}+\frac {b \arctan \left (\frac {c x}{2}-\frac {i}{2}\right )}{4 d^{2}}+\frac {b}{2 d^{2} \left (c x -i\right )}-\frac {i b \ln \left (c^{2} x^{2}+1\right )}{8 d^{2}}+\frac {b \arctan \left (c x \right )}{4 d^{2}}+\frac {i b \ln \left (-\frac {i \left (c x +i\right )}{2}\right ) \ln \left (c x -i\right )}{2 d^{2}}+\frac {i b \operatorname {dilog}\left (-\frac {i \left (c x +i\right )}{2}\right )}{2 d^{2}}-\frac {i b \ln \left (c x -i\right )^{2}}{4 d^{2}}}{c^{2}}\) | \(252\) |
default | \(\frac {\frac {i a}{d^{2} \left (c x -i\right )}-\frac {a \ln \left (c^{2} x^{2}+1\right )}{2 d^{2}}-\frac {i a \arctan \left (c x \right )}{d^{2}}+\frac {i b \arctan \left (c x \right )}{d^{2} \left (c x -i\right )}-\frac {b \arctan \left (c x \right ) \ln \left (c x -i\right )}{d^{2}}+\frac {i b \ln \left (c^{4} x^{4}+10 c^{2} x^{2}+9\right )}{16 d^{2}}-\frac {b \arctan \left (\frac {c x}{2}\right )}{8 d^{2}}+\frac {b \arctan \left (\frac {1}{6} c^{3} x^{3}+\frac {7}{6} c x \right )}{8 d^{2}}+\frac {b \arctan \left (\frac {c x}{2}-\frac {i}{2}\right )}{4 d^{2}}+\frac {b}{2 d^{2} \left (c x -i\right )}-\frac {i b \ln \left (c^{2} x^{2}+1\right )}{8 d^{2}}+\frac {b \arctan \left (c x \right )}{4 d^{2}}+\frac {i b \ln \left (-\frac {i \left (c x +i\right )}{2}\right ) \ln \left (c x -i\right )}{2 d^{2}}+\frac {i b \operatorname {dilog}\left (-\frac {i \left (c x +i\right )}{2}\right )}{2 d^{2}}-\frac {i b \ln \left (c x -i\right )^{2}}{4 d^{2}}}{c^{2}}\) | \(252\) |
risch | \(\frac {i b \ln \left (i c x +1\right )^{2}}{4 c^{2} d^{2}}+\frac {b \ln \left (i c x +1\right )}{2 c^{2} d^{2} \left (c x -i\right )}+\frac {i b \ln \left (\frac {1}{2}+\frac {i c x}{2}\right ) \ln \left (\frac {1}{2}-\frac {i c x}{2}\right )}{2 c^{2} d^{2}}-\frac {i b \ln \left (\frac {1}{2}+\frac {i c x}{2}\right ) \ln \left (-i c x +1\right )}{2 c^{2} d^{2}}+\frac {i b \operatorname {dilog}\left (\frac {1}{2}-\frac {i c x}{2}\right )}{2 c^{2} d^{2}}-\frac {i b \ln \left (c^{2} x^{2}+1\right )}{8 c^{2} d^{2}}+\frac {b \arctan \left (c x \right )}{4 c^{2} d^{2}}+\frac {b \ln \left (-i c x +1\right ) x}{4 c \,d^{2} \left (-i c x -1\right )}+\frac {i b \ln \left (-i c x +1\right )}{4 c^{2} d^{2} \left (-i c x -1\right )}-\frac {a \ln \left (c^{2} x^{2}+1\right )}{2 c^{2} d^{2}}-\frac {i a \arctan \left (c x \right )}{c^{2} d^{2}}+\frac {a}{c^{2} d^{2} \left (-i c x -1\right )}-\frac {b}{2 c^{2} d^{2} \left (-c x +i\right )}\) | \(272\) |
parts | \(-\frac {i a}{d^{2} c^{2} \left (-c x +i\right )}-\frac {a \ln \left (c^{2} x^{2}+1\right )}{2 c^{2} d^{2}}-\frac {i a \arctan \left (c x \right )}{c^{2} d^{2}}+\frac {i b \arctan \left (c x \right )}{c^{2} d^{2} \left (c x -i\right )}-\frac {b \arctan \left (c x \right ) \ln \left (c x -i\right )}{c^{2} d^{2}}+\frac {i b \ln \left (c^{4} x^{4}+10 c^{2} x^{2}+9\right )}{16 c^{2} d^{2}}-\frac {b \arctan \left (\frac {c x}{2}\right )}{8 c^{2} d^{2}}+\frac {b \arctan \left (\frac {1}{6} c^{3} x^{3}+\frac {7}{6} c x \right )}{8 c^{2} d^{2}}+\frac {b \arctan \left (\frac {c x}{2}-\frac {i}{2}\right )}{4 c^{2} d^{2}}+\frac {b}{2 c^{2} d^{2} \left (c x -i\right )}-\frac {i b \ln \left (c^{2} x^{2}+1\right )}{8 c^{2} d^{2}}+\frac {b \arctan \left (c x \right )}{4 c^{2} d^{2}}+\frac {i b \ln \left (c x -i\right ) \ln \left (-\frac {i \left (c x +i\right )}{2}\right )}{2 c^{2} d^{2}}+\frac {i b \operatorname {dilog}\left (-\frac {i \left (c x +i\right )}{2}\right )}{2 c^{2} d^{2}}-\frac {i b \ln \left (c x -i\right )^{2}}{4 c^{2} d^{2}}\) | \(294\) |
[In]
[Out]
\[ \int \frac {x (a+b \arctan (c x))}{(d+i c d x)^2} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )} x}{{\left (i \, c d x + d\right )}^{2}} \,d x } \]
[In]
[Out]
\[ \int \frac {x (a+b \arctan (c x))}{(d+i c d x)^2} \, dx=\frac {\left (- i b c x \log {\left (i c x + 1 \right )} - b \log {\left (i c x + 1 \right )} - b\right ) \log {\left (- i c x + 1 \right )}}{2 c^{3} d^{2} x - 2 i c^{2} d^{2}} - \frac {\int \frac {i b}{c^{3} x^{3} - i c^{2} x^{2} + c x - i}\, dx + \int \frac {i b \log {\left (i c x + 1 \right )}}{c^{3} x^{3} - i c^{2} x^{2} + c x - i}\, dx + \int \frac {2 a c^{2} x^{2}}{c^{3} x^{3} - i c^{2} x^{2} + c x - i}\, dx + \int \left (- \frac {b c x}{c^{3} x^{3} - i c^{2} x^{2} + c x - i}\right )\, dx + \int \frac {2 i a c x}{c^{3} x^{3} - i c^{2} x^{2} + c x - i}\, dx + \int \left (- \frac {b c x \log {\left (i c x + 1 \right )}}{c^{3} x^{3} - i c^{2} x^{2} + c x - i}\right )\, dx + \int \left (- \frac {2 i b c^{2} x^{2} \log {\left (i c x + 1 \right )}}{c^{3} x^{3} - i c^{2} x^{2} + c x - i}\right )\, dx}{2 c d^{2}} \]
[In]
[Out]
\[ \int \frac {x (a+b \arctan (c x))}{(d+i c d x)^2} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )} x}{{\left (i \, c d x + d\right )}^{2}} \,d x } \]
[In]
[Out]
\[ \int \frac {x (a+b \arctan (c x))}{(d+i c d x)^2} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )} x}{{\left (i \, c d x + d\right )}^{2}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {x (a+b \arctan (c x))}{(d+i c d x)^2} \, dx=\int \frac {x\,\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}{{\left (d+c\,d\,x\,1{}\mathrm {i}\right )}^2} \,d x \]
[In]
[Out]